package Com.Hupochuan.Dal.Tab;

import java.util.Hashtable;

import Com.Hupochuan.Dal.DBManager.DBManager;
import Com.Hupochuan.Vo.Area;

public class AreaTab {
	/*
	 * 本类私有对象
	 */
	private DBManager<Area> dbManager = new DBManager<Area>(Area.class);
	
	/*
	 * 单一实例
	 */
	private AreaTab(){}
	private static AreaTab areaTab = new AreaTab();
	public static AreaTab getObject(){
		return areaTab;
	}
	
	/*
	 * 获得导演
	 */
	public Area findArea(long id){
		//参数部分
		Area area = null;
		StringBuffer sqlBuff = new StringBuffer();
		Hashtable<String,Object> paraHash = new Hashtable<String,Object>();
		
		//sql语句部分
		sqlBuff.append(" select * from Area where id=${id} ");
		
		//sql参数部分
		paraHash.put("id",id);
		
		//从列表中获得对象
		area = dbManager.querySqlReturnVo(sqlBuff.toString(),paraHash);
		
		//返回
		return area;
	}
}
